//! io operations

pub unsafe fn read_byte(addr: usize) -> u8 {
    let addr = addr as *const u8;
    assert!(!addr.is_null());
    unsafe { core::ptr::read_volatile(addr) }
}

pub unsafe fn write_byte(addr: usize, data: u8) {
    let addr = addr as *mut u8;
    assert!(!addr.is_null());
    unsafe {
        core::ptr::write_volatile(addr, data);
    }
}
